import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router';
const router=createRouter({
    history: createWebHashHistory(),
    routes: [
        {
            path:'/',
            name:'/',
            redirect:'/login'
        },
        {
            path:'/login',
            name:'login',
            component:()=>import('../views/login.vue'),
            meta:{
                title:'登录'
            }
        },
        {
            path:'/index',
            name:'index',
            component:()=>import('../views/index.vue'),
            redirect:'/index/Gis',
            meta:{
                title:'我的工作台'
            },
            children:[
                {
                    path:'data',
                    name:'data',
                    component:()=>import('../views/data/data.vue'),
                    meta:{
                        title:'信息发布'
                    }
                },
                {
                    path:'release',
                    name:'release',
                    component:()=>import('../views/message/release.vue'),
                    meta:{
                        title:'信息发布'
                    }
                },
                {
                    path:'Gis',
                    name:'Gis',
                    component:()=>import('../views/map/GISmap.vue'),
                    meta:{
                        title:'GIS地图'
                    }
                },
                {
                    path:'search',
                    name:'search',
                    component:()=>import('../views/info/search.vue'),
                    meta:{
                        title:'信息查询'
                    }
                },
                {
                    path:'timeout',
                    name:'timeout',
                    component:()=>import('../views/info/timeout.vue'),
                    meta:{
                        title:'定时发布'
                    }
                },
                {
                    path:'setting',
                    name:'setting',
                    component:()=>import('../views/info/setting.vue'),
                    meta:{
                        title:'脱敏设置'
                    }
                },
                {
                    path:'apply',
                    name:'apply',
                    component:()=>import('../views/info/apply.vue'),
                    meta:{
                        title:'发布申请'
                    }
                },
                {
                    path:'moudle',
                    name:'moudle',
                    component:()=>import('../views/device/moudle.vue'),
                    meta:{
                        title:'模版管理'
                    }
                },
                {
                    path:'ledger',
                    name:'ledger',
                    component:()=>import('../views/device/ledger.vue'),
                    meta:{
                        title:'设备台账'
                    }
                },
                {
                    path:'history',
                    name:'history',
                    component:()=>import('../views/history/history.vue'),
                    meta:{
                        title:'发布历史'
                    }
                },
                {
                    path:'parameter',
                    name:'parameter',
                    component:()=>import('../views/device/parameter.vue'),
                    meta:{
                        title:'参数设置'
                    }
                },
                {
                    path:'detection',
                    name:'detection',
                    component:()=>import('../views/device/detection.vue'),
                    meta:{
                        title:'设备检测'
                    }
                },
                {
                    path:'changePWD',
                    name:'changePWD',
                    component:()=>import('../views/system/changePWD.vue'),
                    meta:{
                        title:'修改密码'
                    }
                }
            ]
        }, 
        {
            path:'/sys',
            name:'sys',
            component:()=>import('../views/sys.vue'),
            meta:{
                title:'系统设置'
            },
            children:[
               
            ]
        }
    ]
})
export default router;